home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group99a.txt
/
000222_icon-group-sender _Tue Oct 26 16:31:01 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id QAA15379
for icon-group-addresses; Tue, 26 Oct 1999 16:30:46 -0700 (MST)
Message-Id: <199910262330.QAA15379@baskerville.CS.Arizona.EDU>
X-Authentication-Warning: agate-ether.berkeley.edu: news set sender to <news> using -f
From: "Sean R. McCorkle" <mccorkle@bnl.gov>
X-Newsgroups: comp.lang.icon
Subject: csets and sets of characters
Date: Tue, 26 Oct 1999 16:20:41 -0400
To: icon-group@optima.CS.Arizona.EDU
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
In writing an Icon version of a command line options parser,
like getopt() in C & Perl, I decided to first convert the input
string of option characters (ie. "abc:12:") into two sets of
characters, one for options that take arguments, and one for
options which take no arguments. This is easy using Icon sets,
but it seems more natural somehow to use the built-in cset
datatype. But I don't see how to test for members in csets
(member( 'abc', "b" ) generates a run time error). Any sage
advice out there about when to use sets and/or csets?
Also, if anybody has any examples of command line options parsers,
or if there's one I've overlooked the standard libs or literature,
I'd sure be grateful if someone could point 'em out to me. (I'm a
real novice at Icon)
Thank you all,
--
------------------------------------------------------------------------------
Sean R. McCorkle mccorkle@bnl.gov
Biology Department, Genome Group (516) 344-4270 phone
Brookhaven National Laboratory (516) 344-3407 fax
Upton, New York 11973
"Oh plunge your hands in water, Plunge them in up to the wrist,
Stare, stare in the basin, And wonder what you've missed." - W.H. Auden